Flow measurement with diagnostics

ABSTRACT

A fluid flow meter diagnosing the condition of its primary element or impulse lines connecting to a differential pressure sensor. A difference circuit coupled to the differential pressure sensor has a difference output representing the sensed differential pressure minus a moving average. A calculate circuit receives the difference output and calculates a trained output of historical data obtained during an initial training time. The calculate circuit also calculates a monitor output of current data obtained during monitoring or normal operation of the fluid flow meter. A diagnostic circuit receives the trained output and the monitor put and generates a diagnostic output indicating a current condition of the primary element and impulse lines.

This is a Continuation-In-Part of U.S. application Ser. No. 09/257,896, filed Feb. 25, 1999 which is a Continuation-In-Part of U.S. application Ser. No. 08/623,569, filed Mar. 28, 1996.

BACKGROUND OF THE INVENTION

Fluid flow meters are used in industrial process control environments to measure fluid flow and provide flow signals for flow indicators and controllers. Inferential flow meters measure fluid flow in a pipe by measuring a pressure drop near a discontinuity within the pipe. The discontinuity (primary element) can be an orifice, a nozzle, a venturi, a pitot tube, a vortex shedding bar, a target or even a simple bend in the pipe. Flow around the discontinuity causes both a pressure drop and increased turbulence. The pressure drop is sensed by a pressure transmitter (secondary element) placed outside the pipe and connected by impulse lines or impulse passageways to the fluid in the pipe. Reliability depends on maintaining a correct calibration. Erosion or buildup of solids on the primary element can change the calibration. Impulse lines can become plugged over time, which also adversely affects calibration.

Disassembly and inspection of the impulse lines is one method used to detect and correct plugging of lines. Another known method for detecting plugging is to periodically add a “check pulse” to the measurement signal from a pressure transmitter. This check pulse causes a control system connected to the transmitter to disturb the flow. If the pressure transmitter fails to accurately sense the flow disturbance, an alarm signal is generated indicating line plugging. Another known method for detecting plugging is sensing of both static and differential pressures. If there is inadequate correlation between oscillations in the static and differential pressures, then an alarm signal is generated indicating line plugging. Still another known method for detecting line plugging is to sense static pressures and pass them through high pass and low pass filters. Noise signals obtained from the filters are compared to a threshold, and if variance in the noise is less than the threshold, then an alarm signal indicates that the line is blocked.

These known methods rely on providing static pressure sensors or disassembly of the flow meter or use of an external control system for diagnostics, increasing complexity and reducing reliability. These known methods do not provide for diagnosing the condition of the primary element. There is thus a need for a better diagnostic technology providing more predictive, less reactive maintenance for reducing cost or improving reliability.

SUMMARY OF THE INVENTION

A fluid flow meter diagnoses the condition of its primary element or impulse lines. The primary element and the impulse lines together form a differential pressure generator. This differential pressure generator generates a differential pressure that represents the flow rate. The differential pressure is coupled to a differential pressure sensor in the fluid flow meter.

A difference circuit coupled to the differential pressure sensor generates a difference output representing the sensed differential pressure minus a moving average of the sensed differential pressure.

A calculate circuit receives the difference output and calculates a trained output of historical data obtained during an initial training time. The calculate circuit also calculates a monitor output of current data obtained during monitoring or normal operation of the fluid flow meter.

A diagnostic circuit receives the trained output and the monitor output and generates a diagnostic output indicating a current condition of the pressure generator relative to an historical condition.

A flow circuit is also coupled to the sensor and generates an output indicating the flow rate.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an illustration of a typical fluid processing environment for the diagnostic flow meter.

FIG. 2 is a pictorial illustration of an embodiment of a transmitter used in a fluid flow meter that diagnoses the condition of its impulse lines and/or primary element.

FIG. 3 is a block diagram of a fluid flow meter that diagnoses a condition of its pressure generator.

FIG. 4 is a block diagram of a fluid flow meter that diagnoses the condition of its impulse lines.

FIG. 5 is a block diagram of a fluid flow meter that diagnoses the condition of its primary element.

FIG. 6 is a flow chart of a process diagnosing the condition of impulse lines.

FIG. 7 illustrates a diagnostic fluid flow meter that has a pitot tube for a primary element.

FIG. 8 illustrates a diagnostic fluid flow meter that has an in-line pitot tube for a primary element.

FIG. 9 illustrates a diagnostic fluid flow meter that has an integral orifice plate for a primary element.

FIG. 10 illustrates a diagnostic fluid flow meter than has an orifice plate clamped between pipe flanges for a primary element.

FIG. 11 illustrates a diagnostic fluid flow meter that has a venturi for a primary element.

FIG. 12 illustrates a diagnostic fluid flow meter that has a nozzle for a primary element.

FIG. 13 illustrates a diagnostic fluid flow meter that has an orifice plate for a primary element.

FIG. 14 is a flow chart of a process of diagnosing the condition of a primary element.

FIG. 15 is a flow chart of a process of diagnosing the condition of both impulse lines and a primary element.

FIG. 16 is an illustration of a transmitter with remote seals and diagnostics.

FIG. 17 is a schematic illustration of a transmitter with diagnostic features connected to a tank to measure a time integral of flow in and out of the tank.

FIG. 18 is a graph of amplitude versus frequency versus time of a process variable signal.

FIG. 19 is a block diagram of a discrete wavelet transformation.

FIG. 20 is a graph showing signals output from a discrete wavelet transformation.

FIG. 21 is a diagram showing a simplified neural network.

FIG. 22A is a diagram showing a neural network used to provide a residual lifetime estimate.

FIG. 22B is a graph of residual life versus time.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

In FIG. 1, a typical environment for diagnostic flow measurement is illustrated at 220. In FIG. 1, process variable transmitters such as flow meter 230, level transmitters 232, 234 on tank 236 and integral orifice flow meter 238 are shown connected to control system 240. Process variable transmitters can be configured to monitor one or more process variables associated with fluids in a process plant such as slurries, liquids, vapors and gasses in chemical, pulp, petroleum, gas, pharmaceutical, food and other fluid processing plants. The monitored process variables can be pressure, temperature, flow, level, pH, conductivity, turbidity, density, concentration, chemical composition or other properties of fluids. Process variable transmitter includes one or more sensors that can be either internal to the transmitter or external to the transmitter, depending on the installation needs of the process plant. Process variable transmitters generate one or more transmitter outputs that represent the sensed process variable. Transmitter outputs are configured for transmission over long distances to a controller or indicator via communication busses 242. In typical fluid processing plants, a communication buss 242 can be a 4-20 mA current loop that powers the transmitter, or a fieldbus connection, a HART protocol communication or a fiber optic connection to a controller, a control system or a readout. In transmitters powered by a 2 wire loop, power must be kept low to provide intrinsic safety in explosive atmospheres.

In FIG. 1, integral orifice flow meter 238 is provided with a diagnostic output which is also coupled along the communication bus 242 connected to it. Control system 240 can be programmed to display the diagnostic output for a human operator, or can be programmed to alter its operation when there is a diagnostic warning from flow meter 238. Control system 240 controls the operation of output devices such as control valve 244, pump motors or other controlling devices.

In FIG. 2, an exploded view of a typical diagnostic transmitter 82 according to the present invention is shown generally. Transmitter 82 includes a flange 83 for receiving a differential pressure, a differential pressure sensor 31, electronics including an analog to digital converter 84, a microprocessor system 88, a digital to analog converter 96, and a digital communications circuit 100. Transmitter 82 is bolted to flange adapter 87. Microprocessor 88 is programmed with diagnostic algorithms as explained by examples shown in FIGS. 3, 6, 14 and 15. Flange adapter 87 connects to impulse pipes which, in turn, connect to flow around a primary flow element (not shown in FIG. 2). The arrangement of transmitter 82 of FIG. 2 is explained in more detail in FIG. 3.

In FIG. 3, a block diagram shows a first embodiment of a fluid flow meter 80 adapted to sense fluid flow 22 in pipe 24. Fluid flow meter 80 includes a pressure generator 26 that includes a primary element 28 and impulse lines 30 that couple pressures generated in the fluid flow around the primary element 28 to a differential pressure sensor 31 in a pressure transmitter 82. The term “pressure generator” as used in this application means a primary element (e.g., an orifice plate, a pitot tube, a nozzle, a venturi, a shedding bar, a bend in a pipe or other flow discontinuity adapted to cause a pressure drop in flow) together with impulse pipes or impulse passageways that couple the pressure drop from locations near the primary element to a location outside the flow pipe. The spectral and statistical characteristics of this pressure presented by this defined “pressure generator” at a location outside the flow pipe to a connected pressure transmitter 82 can be affected by the condition of the primary element as well as on the condition of the impulse pipes. The connected pressure transmitter 82 can be a self-contained unit, or it can be fitted with remote seals as needed to fit the application. A flange 83 on the pressure transmitter 82 (or its remote seals) couples to a flange adapter 87 on the impulse lines 30 to complete the pressure connections. Pressure transmitter 82 couples to a primary flow element 28 via impulse lines 30 to sense flow. The pressure transmitter 82 comprises a differential pressure sensor 31 adapted to couple to the impulse lines 30 via a flange arrangement. An analog to digital converter 84 couples to the pressure sensor 31 and generates a series of digital representations of the sensed pressure at 86. A microprocessor system 88 receives the series of digital representations of pressure at 86 and has a first algorithm 90 stored therein calculating a difference between the series of digital representations 86 and a moving average of the series of digital representations. A second algorithm 92 is also stored in the microprocessor system 88 that receives the difference calculated by algorithm 90 and calculates a trained data set of historical data during a training mode and calculates a current data set during a monitoring mode and generates diagnostic data 94 as a function of the current data set relative to the historical data indicating changes in the condition of pressure generator 26. A digital to analog converter 96 coupled to the microprocessor system 88 generates an analog transmitter output 98 indicative of the sensed flow rate. A digital communication circuit 100 receives the diagnostic data 94 from the microprocessor system 88 and generates a transmitter output 102 indicating the diagnostic data. The analog output 98 and the diagnostic data 102 can be coupled to indicators or controllers as desired.

In FIG. 4, a block diagram shows a further embodiment of a fluid flow meter 20 adapted to sense fluid flow 22 in pipe 24. The fluid flow meter 20 in FIG. 4 is similar to the fluid flow meters 80 of FIG. 3 and the same reference numerals used in FIGS. 3 are also used in FIG. 4 for similar elements. Fluid flow meter 20 includes a pressure generator 26 that includes a primary element 28 and impulse lines 30 that couple pressures generated in the fluid flow around the primary element 28 to a differential pressure sensor 31 in a pressure transmitter 32. The pressure transmitter 32 can be a self-contained unit, or it can be fitted with remote seals as needed to fit the application. A flange on the pressure transmitter 32 (or its remote seals) couples to a flange adapter on the impulse lines 30 to complete the pressure connections. A flow circuit 34 in the pressure transmitter 32 couples to the sensor 31 and generates a flow rate output 36 that can couple to a controller or indicator as needed.

In FIG. 4, a difference circuit 42 couples to the sensor 31 and generates data at a difference output 44 representing the sensed pressure minus a moving average. A calculate circuit 46 receives the difference output 44 and calculates a trained output 48 of historical data obtained during a training mode or time interval. After training, calculate circuit 46 calculates a monitor output 50 of current data obtained during a monitoring mode or normal operation time of the fluid flow meter 20.

In FIG. 4, a diagnostic circuit 52 receives the trained output 48 and the monitor output 50 and generating a diagnostic output 54 indicating a current condition of the pressure generator 26 relative to an historical condition. In FIG. 4, calculate circuit 46 stores the historical data in circuit 56 which includes memory.

In difference circuit 42, the moving average is calculated according to the series in Eq. 1: $\begin{matrix} {A_{j} = {\sum\limits_{k = 0}^{m}\quad {\left( P_{j + k} \right)\left( W_{k} \right)}}} & {{Eq}.\quad 1} \end{matrix}$

where A is the moving average, P is a series of sequentially sensed pressure values, and W is a numerical weight for a sensed pressure value, m is a number of previous sensed pressure values in the series. Provision can also be made in difference circuit 42 to filter out spikes and other anomalies present in the sensed pressure. In FIG. 4, the historical data comprises statistical data, for example, the mean (μ) and standard deviation (σ) of the difference output or other statistical measurements, and the diagnostic output 54 indicates impulse line plugging. The calculate circuit 46 switches between a training mode when it is installed and a monitoring mode when it is in use measuring flow. The calculate circuit 46 stores historical data in the training mode. The diagnostic output 54 indicates a real time condition of the pressure generator 26.

In FIG. 4, statistical data, such as the mean μ and standard deviation μ, are calculated based on a relatively large number of data points or flow measurements. The corresponding sample statistical data, such as sample mean X and sample standard deviation s, are calculated from a relatively smaller number of data points. Typically, hundreds of data points are used to calculate statistical data such as μ and σ, while only about 10 data points are used to calculate sample statistical data such as X and s. The number of data points during monitoring is kept smaller in order to provide diagnostics that is real time, or completed in about 1 second. Diagnostic circuit 52 indicates line plugging if the sample standard deviation s deviates from the standard deviation a by a preset amount, for example 10%.

In FIG. 5, a fluid flow meter 60 is shown that diagnoses the condition of the primary element 28. The fluid flow meter 60 in FIG. 5 is similar to the fluid flow meter 20 of FIG. 4 and the same reference numerals used in FIG. 4 are also used in 5 for similar elements. In 5, the diagnostic output 62 indicates a condition of the primary element 28, while in FIG. 4, the diagnostic output indicates a condition of the impulse lines 30. In FIG. 5, calculate circuit 46 calculates and stores data on power spectral density (PSD) of the difference output 44 rather than statistical data which is used in FIG. 4. The power spectral density data is preferably in the range of 0 to 100 Hertz. The center frequency of a bandpass filter can be swept across a selected range of frequencies to generate a continuous or quasi-continuous power spectral density as a function of frequency in a manner that is well known. Various known Fourier transforms can be used.

Power spectral density, Fi, can also be calculated using Welch's method of averaged periodograms for a given data set. The method uses a measurement sequence x(n) sampled at fs samples per second, where n=1, 2, . . . N. A front end filter with a filter frequency less than fs/2 is used to reduce aliasing in the spectral calculations. The data set is divided into F_(k,i) as shown in Eq. 2: $\begin{matrix} {F_{k,i} = {\left( {1/M} \right){{\sum\limits_{n = 1}^{M}\quad {{x_{k}(n)}^{{- j}\quad 2_{\pi}\quad \Delta \quad {fn}}}}}^{2}}} & {{Eq}.\quad 2} \end{matrix}$

There are F_(k,i) overlapping data segments and for each segment, a periodogram is calculated where M is the number of points in the current segment. After all periodograms for all segments are evaluated, all of them are averaged to calculate the power spectrum: $\begin{matrix} {{Fi} = {\left( {1/L} \right){\sum\limits_{k = 1}^{L}\quad F_{k,i}}}} & {{Eq}.\quad 3} \end{matrix}$

Once a power spectrum is obtained for a training mode, this sequence is stored in memory, preferably EEPROM, as the baseline power spectrum for comparison to real time power spectrums. Fi is thus the power spectrum sequence and i goes from 1 to N which is the total number of points in the original data sequence. N, usually a power of 2, also sets the frequency resolution of the spectrum estimation. Therefore, Fi is also known as the signal strength at the i^(th) frequency. The power spectrum typically includes a large number points at predefined frequency intervals, defining a shape of the spectral power distribution as a function of frequency.

In the detection of the primary element degradation, a relatively larger sample of the spectral density at baseline historical conditions and a relatively smaller sample of the spectral density at monitoring conditions are compared. The relatively smaller sample allows for a real time indication of problems in about 1 second. An increase in the related frequency components of the power spectrum can indicate the degradation of the primary element. Using orifice plates as primary elements, for example, changes as high as 10% are observed in spectral components when the orifice plate is degraded to a predetermined level. The amount of change can be adjusted as needed, depending on the tolerable amount of degradation and the type of primary element in use. The amount of change needed to indicate a problem is arrived at experimentally for each type of primary element arrangement. Fuzzy logic can also be used to compare the many points of the power spectrums.

In FIG. 6, a flow chart 120 of a method of diagnosis performed in a pressure transmitter couplable to a primary flow element via impulse lines is shown. The algorithm starts at 122. A moving average is subtracted from differential pressure data as shown at 124 to calculate a difference. During a train mode, historical data on the calculated difference is acquired and stored at 126 as statistical data μ and μ, for example. During an operational MONITOR mode, current data on the difference is acquired and stored at 128 as statistical data X and s. The smaller sample of current data is compared to the larger sample of the historical data to diagnose the condition of the impulse lines. Comparisons of historical and current statistical data are made at 132, 134, 136 and a selected diagnostic transmitter output is generated at 138, 140, 142 as a function of the comparisons made at 130, 132, 134, 136 respectively. After completion of any diagnostic output, the process loops back at 144 to repeat the monitor mode diagnostics, or the transmitter can be shut down until maintenance is performed. If the diagnostic process itself fails, an error indication is provided on the diagnostic output at 146. In the method 120 of diagnosis, the historical data set comprises statistical data such as data on the mean (μ) and standard deviation (σ) of the calculated difference; the current data set comprises current sample statistical data, such as the sample average (X) and sample deviation (s) of the calculated difference. The sample deviation (s) is compared to the standard deviation (σ) to diagnose impulse line plugging, for example. Other known statistical measures of uncertainty, or statistical measures developed experimentally to fit this application can also be used besides mean and standard deviation. When there is an unusual flow condition where X is much different than μ, the diagnostics can be temporarily suspended as shown at 130 until usual flow conditions are reestablished. This helps to prevent false alarm indications.

In FIGS. 2-5, the transmitter generates a calibrated output and also a diagnostic output that indicates if the pressure generator is out of calibration. In FIGS. 2-5, the primary element can comprise a simple pitot tube or an averaging pitot tube. The averaging pitot tube 63 can be inserted through a tap 64 on a pipe as shown in FIG. 7. An instrument manifold 66, as shown in FIG. 8, can be coupled between the pressure generator 26 and a pressure transmitter 68. The primary element 28 and impulse pipes 30 can be combined in an integral orifice as shown in FIG. 9. An orifice plate adapted for clamping between pipe flanges is shown in FIG. 10. The primary element can comprise a venturi as shown in FIG. 11 or a nozzle as shown in FIG. 12, or an orifice as shown in FIG. 13. A standard arrangement of a pressure generator can be used with a transmitter that is adapted to provide the diagnostics outputs. The transmitter adapts itself to the characteristics of the pressure generator during the training mode and, has a standard of comparison stored during the training mode that is available for comparison during the monitoring or operational mode. The standard of comparison can be adjusted as needed by a technician via the digital communication bus. In each arrangement, the fluid flow meter provides a calibrated flow rate output and the diagnostic output of the transmitter indicates if the pressure generator is out of calibration.

In FIG. 14, a flow chart 160 of a process for diagnosing the condition of a primary element is shown. The condition of the primary element can include erosion or fouling of the primary element. The method or algorithm starts at 162. Sensor data is taken in a training mode or time interval as shown at 164. A power spectrum of the sensor data, minus the moving average, is calculated at 166. The power spectrum obtained is identified as the training power spectrum at 168 and stored in non-volatile memory 170. After completion of training, the process moves on to monitoring or normal use. A further power spectrum of current sensor data, minus the moving average, is evaluated at 172, and the power spectrum so obtained in stored in memory 174, that can be either RAM or nonvolatile memory. At 176, the power spectrum Fi obtained during training is compared to the power spectrum Fi obtained during monitoring. If there is a significant difference between Fi and Fi which is indicative of a problem with the primary element, a primary element warning (PE Warning) is generated as shown at 178. If the power spectrums Fi and Fi are sufficiently similar, then no primary element warning is generated. After the comparison at 176 and generation of a PE Warning, as needed, program flow moves to obtain new real time sensor data at 180 and the monitoring process moves on to a new evaluation at 172, or the flow meter can shut down when there is a PE warning. The process 160 can loop continuously in the monitoring mode to provide real time information concerning the condition of the primary element.

In FIG. 15, a flow chart illustrates a process 190 which provides diagnosis of both primary element (PE) and impulse lines (IL). Program flow starts at 200. During a training mode illustrated at 202, sensor data, minus a moving average, is obtained and training power spectrum and training statistics are stored in nonvolatile memory as explained above. Next, impulse line diagnostics (such as those explained in process 128 in FIG. 6) are performed at step 204 in FIG. 15. In FIG. 15, after impulse line diagnostics are performed, current impulse line statistics are compared to historical (training) impulse line statistics (as detailed in processes 130, 132, 134, 136 in FIG. 6) at 206. If the comparison indicates a problem with plugging of impulse lines, then an impulse line warning is generated as shown at 208. If no problem with the impulse lines is apparent, then program flow moves on to primary element (PE) diagnostics at 210. At process 210, power spectral density for the current real time data is calculated (as explained above in connection with FIG. 14). The current power spectral density is compared to the historical power spectral density at 212, and if there is a difference large enough to indicate a problem with the primary element, then a PE Warning is generated as shown at 214. If the differences in the power spectral densities are small, then no PE warning is generated as shown at 216. Program flow continues on at 218 to repeat the IL and PE diagnostics, or the flow meter can be shut down if there is a PE or IL warning until maintenance is performed.

Any of the methods can be stored on a computer-readable medium as a plurality of sequences of instructions, the plurality of sequences of instructions including sequences that, when executed by a microprocessor system in a pressure transmitter cause the pressure transmitter to perform a diagnostic method relative to a primary element and impulse lines couplable to the transmitter.

FIG. 16 illustrates a transmitter 230 which includes remote seals 232, 234 connected by flexible capillary tubes 236, 238 that are filled with a controlled quantity of isolation fluid such as silicon oil. The isolator arrangement permits placement of the sensor and electronics of transmitter 230 to be spaced away from extremely hot process fluids which contact the remote seals. The diagnostic circuitry of transmitter 230 can also be used to detect leaking and pinching off of capillary tubes 236, 238 using the diagnostic techniques described above to provide diagnostic output 239.

FIG. 17 schematically illustrates a transmitter 240 which is connected to taps 248, 250 near the bottom and top of tank 242. Transmitter 240 provides an output 244 that represents a time integral of flow in and out of the tank 242. Transmitter 240 includes circuitry, or alternatively software, that measures the differential pressure between the taps 248, 250 and computes the integrated flow as a function of the sensed differential pressure and a formula stored in the transmitter relating the sensed pressure to the quantity of fluid in the tank. This formula is typically called a strapping function and the quantity of fluid which has flowed into or out of the tank can be integrated as either volumetric or mass flow, depending on the strapping function stored in transmitter 240. The diagnostic circuitry or software in transmitter 240 operates as explained above to provide diagnostic output 252. FIG. 17 is a schematic illustration, and transmitter 240 can be located either near the bottom or the top of tank 242, with a tube going to the other end of the tank, often called a “leg.” This leg can be either a wet leg filled with the fluid in the tank, or a dry leg filled with gas. Remote seals can also be used with transmitter 240.

In one embodiment, microprocessor system 88 includes signal preprocessor which is coupled to sensor 88 through analog to digital converter 84 which isolates signal components in the sensor signal such as frequencies, amplitudes or signal characteristics which are related to a plugged impulse line 30 or degraded primary element 28. The signal preprocessor provides an isolated signal output to a signal evaluator in microprocessor 88. The signal preprocessor isolates a portion of the signal by filtering, performing a wavelet transform, performing a Fourier transform, use of a neural network, statistical analysis, or other signal evaluation techniques. Such preprocessing is preferably implemented in microprocessor 88 or in a specialized digital signal processor. The isolated signal output is related to a plugged or plugging impulse line 30 or degraded primary element 28 sensed by sensor 31.

The signal components are isolated through signal processing techniques in which only desired frequencies or other signal characteristics such as amplitude are identified and an indication of their identification is provided. Depending upon the strength signals to be detected and their frequency, signal preprocessor can comprise a filter, for example a band pass filter, to generate the isolated signal output. For more sensitive isolation, advanced signal processing techniques are utilized such as a Fast Fourier transform (FFT) to obtain the spectrum of the sensor signal. In one preferred embodiment, the signal preprocessor comprises a wavelet processor which performs a wavelet analysis on the sensor signal as shown in FIGS. 18, 19 and 20 using a discrete wavelet transform. Wavelet analysis is well suited for analyzing signals which have transients or other non-stationary characteristics in the time domain. In contrast to Fourier transforms, wavelet analysis retains information in the time domain, i.e., when the event occurred.

Wavelet analysis is a technique for transforming a time domain signal into the frequency domain which, like a Fourier transformation, allows the frequency components to be identified. However, unlike a Fourier transformation, in a wavelet transformation the output includes information related to time. This may be expressed in the form of a three dimensional graph with time shown on one axis, frequency on a second axis and signal amplitude on a third axis. A discussion of wavelet analysis is given in On-Line Tool Condition Monitoring System With Wavelet Fuzzy Neural Network, by L. Xiaoli et al., 8 JOURNAL OF INTELLIGENT MANUFACTURING pgs. 271-276 (1997). In performing a continuous wavelet transformation, a portion of the sensor signal is windowed and convolved with a wavelet function. This convolution is performed by superimposing the wavelet function at the beginning of a sample, multiplying the wavelet function with the signal and then integrating the result over the sample period. The result of the integration is scaled and provides the first value for continuous wavelet transform at time equals zero. This point may be then mapped onto a three dimensional plane. The wavelet function is then shifted right (forward in time) and the multiplication and integration steps are repeated to obtain another set of data points which are mapped onto the 3-D space. This process is repeated and the wavelet is moved (convolved) through the entire signal. The wavelet function is then scaled, which changes the frequency resolution of the transformation, and the above steps are repeated.

Data from a wavelet transformation of a sensor signal from sensor 31 is shown in FIG. 18. The data is graphed in three dimensions and forms a surface 270. As shown in the graph of FIG. 18, the sensor signal includes a small signal peak at about 1 kHz at time t₁ and another peak at about 100 Hz at time t₂. Through subsequent processing by the signal evaluator, surface 270 or portions of surface 270 are evaluated to determine impulse piping or primary element degradation.

The continuous wavelet transformation described above requires extensive computations. Therefore, in one embodiment, microprocessor 88 performs a discrete wavelet transform (DWT) which is well suited for implementation in microprocessor system. One efficient discrete wavelet transform uses the Mallat algorithm which is a two channel sub-band coder. The Mallet algorithm provides a series of separated or decomposed signals which are representative of individual frequency components of the original signal. FIG. 19 shows an example of such a system in which an original sensor signal S is decomposed using a sub-band coder of a Mallet algorithm. The signal S has a frequency range from 0 to a maximum of f_(MAX). The signal is passed simultaneously through a first high pass filter having a frequency range from ½ f_(MAX) to f_(MAX), and a low pass filter having a frequency range from 0 to ½ f_(MAX).

This process is called decomposition. The output from the high pass filter provides “level 1” discrete wavelet transform coefficients. The level 1 coefficients represent the amplitude as a function of time of that portion of the input signal which is between ½ f_(max) and f_(MAX) The output from the 0-½ f_(max) low pass filter is passed through subsequent high pass (¼ f_(max)-¼ f_(max)) and low pass (0-½ f_(max)) filters, as desired, to provide additional levels (beyond “level 1”) of discrete wavelet transform coefficients. The outputs from each low pass filter can be subjected to further decompositions offering additional levels of discrete wavelet transformation coefficients as desired. This process continues until the desired resolution is achieved or the number of remaining data samples after a decomposition yields no additional information. The resolution of the wavelet transform is chosen to be approximately the same as the sensor or the same as the minimum signal resolution required to monitor the signal. Each level of DWT coefficients is representative of signal amplitude as a function of time for a given frequency range. Coefficients for each frequency range are concatenated to form a graph such as that shown in FIG. 18.

In some embodiments, padding is added to the signal by adding data to the sensor signal near the borders of windows used in the wavelet analysis. This padding reduces distortions in the frequency domain output. This technique can be used with a continuous wavelet transform or a discrete wavelet transform. “Padding” is defined as appending extra data on either side of the current active data window, for example, extra data points are added which extend 25% of the current window beyond either window edge. In one embodiment, the padding is generated by repeating a portion of the data in the current window so that the added data “pads” the existing signal on either side. The entire data set is then fit to a quadratic equation which is used to extrapolate the signal 25% beyond the active data window.

FIG. 20 is an example showing a signal S generated by sensor 31 and the resultant approximation signals yielded in seven decomposition levels labeled level 1 through level 7. In this example, signal level 7 is representative of the lowest frequency DWT coefficient which can be generated. Any further decomposition yields noise. All levels, or only those levels which relate impulse piping or primary element degradation are provided.

Microprocessor 88 evaluates the isolated signal received from the signal preprocessing and in one embodiment, monitors an amplitude of a certain frequency or range of frequencies identified and provides a diagnostic output if a threshold is exceeded. Signal evaluator can also comprise more advanced decision making algorithms such as fuzzy logic, neural networks, expert systems, rule based systems, etc. Commonly assigned U.S. Patent application Ser. No. 08/623,569 describes various decision making systems which can be implemented in signal evaluator 154 and is incorporated herein by reference.

Microprocessor 88 performs diagnostics related to the impulse piping or primary element using information derived from the differential pressure sensor 31. The following describes a number, of embodiments for realizing a diagnostic circuit. The diagnostic circuit can provide a residual lifetime estimate, an indication of a failure, an indication of an intending failure or a calibration output which is used to correct for errors in the sensed process variable.

A. POLYNOMIAL CURVEFIT

In one embodiment of the present invention empirical models or polynomial curve-fitting are used to detect line plugging or primary element degradation. A polynomial-like equation which has a combination of input signals such as various statistical parameters can be used to detect primary element degradation or impulse line plugging. Constants for the equations can be stored in a memory in the transmitter or received over the communication loop 242.

B. NEURAL NETWORKS

The signal can be analyzed using a neural network. One such neural network is a multi-layer neural network. Although a number of training algorithms can be used to develop a neural network model for different goals. One embodiment includes the known Backpropagation Network (BPN) to develop neural network modules which will capture the nonlinear relationship among a set of input and output(s). FIG. 21 shows a typical topology *of a three-layer neural network architecture implemented in microprocessor 88. The first layer, usually referred to as the input buffer, receives the information, and feeds them into the inner layers. The second layer, in a three-layer network, commonly known as a hidden layer, receives the information from the input layer, modified by the weights on the connections and propagates this information forward. This is illustrated in the hidden layer which is used to characterize the nonlinear properties of the system analyzed. The last layer is the output layer where the calculated outputs (estimations) are presented to the environment.

FIG. 22A shows a schematic of a neural network which provides a residual life estimate for a primary element or impulse pipe based upon a sensor signal. The sensor signal can be either a raw sensor signal or a sensor signal which has been processed through signal processing techniques. FIG. 22B is a graph of residual life versus time and shows that an alarm level can be set prior to an estimated failure time. This allows the system to provide an alarm output prior to actual failure of the device.

C. THRESHOLD CIRCUITRY

This embodiment uses a set of if-then rules to reach a conclusion on the status of the impulse piping or primary element. This embodiment may be implemented easily in analog or digital circuitry. For example, with a simple rule, if the signal drops a certain amount below a historical mean, an output can be provided which indicates that an impulse line is plugged or is in the process of becoming plugged. Of course, more complex rules can be used which use multiple statistical parameters or signal components of the sensor signal to provide more accurate or different information.

D. WAVELETS

With this embodiment, one or more of the decomposition signal(s) in a wavelet analysis directly relate to line plugging and are used to diagnose the transmitter.

Although the present invention has been described with reference to preferred embodiments, workers skilled in the art will recognize that changes can be made in form and detail without departing from the spirit and scope of the invention. For example, various function blocks of the invention have been described in terms of circuitry, however, many function blocks may be implemented in other forms such as digital and analog circuits, software and their hybrids. When implemented in software, a microprocessor performs the functions and the signals comprise digital values on which the software operates. A general purpose processor programmed with instructions that cause the processor to perform the desired process elements, application specific hardware components that contain circuit wired to perform the desired elements and any combination of programming a general purpose processor and hardware components can be used. Deterministic or fuzzy logic techniques can be used as needed to make decisions in the circuitry or software. Because of the nature of complex digital circuitry, circuit elements may not be partitioned into separate blocks as shown, but components used for various functional blocks can be intermingled and shared. Likewise with software, some instructions can be shared as part of several functions and be intermingled with unrelated instructions within the scope of the invention. 

What is claimed is:
 1. A pressure transmitter adapted to couple to a primary flow element via impulse lines to sense flow, the pressure transmitter comprising: a differential pressure sensor adapted to couple to the impulse lines to sense a pressure; an analog to digital converter coupled to the pressure sensor and generating a series of digital representations of the pressure; a microprocessor system receiving the series of digital representations of pressure and having a first algorithm stored therein to calculate a difference between the series of digital representations and a moving average of the series of digital representations, and having a second algorithm stored therein to receive the difference and calculate a trained data set of historical data during a training mode and calculating a current data set during a monitoring mode and generating diagnostic data as a function of the current data set relative to the historical data indicating changes in the condition of flow sensing; a digital to analog converter coupled to the microprocessor system generating an analog transmitter output indicative of flow; and a digital communication circuit receiving the diagnostic data from the microprocessor system and generating a transmitter output indicating the diagnostic data.
 2. The pressure transmitter of claim 1 wherein the microprocessor system stores the trained data set.
 3. The pressure transmitter of claim 1 wherein the moving average is calculated according to a series $A_{j} = {\sum\limits_{k = 0}^{m}\quad {\left( P_{j + k} \right)\left( W_{k} \right)}}$

where A is the moving average, P is a series of sensed pressure values, and W is a weight for a sensed pressure value, m is a number of previous sensed pressure values in the series, k is an integer ranging from 0 to m and j identifies a sample number.
 4. The pressure transmitter of claim 1 wherein the trained data set comprises statistical data.
 5. The pressure transmitter of claim 1 wherein the microprocessor system switches from the training mode to the monitoring mode.
 6. The pressure transmitter of claim 5 wherein the microprocessor system stores the trained data set in the training mode.
 7. The pressure transmitter of claim 1 wherein the diagnostic data indicates a real time condition of a pressure generator.
 8. The pressure transmitter of claim 1 wherein the diagnostic data indicates a condition of the primary flow element.
 9. The pressure transmitter of claim 1 wherein the diagnostic data indicates a condition of the impulse lines.
 10. The pressure transmitter of claim 1 wherein the analog transmitter output comprises a calibrated output, and the diagnostic data transmitter output indicates if the pressure sensor is out of calibration.
 11. The pressure transmitter of claim 1 wherein the trained data set of historical data comprises power spectral density of the difference.
 12. The pressure transmitter of claim 11 wherein the power spectral density data is in the range of 0 to 100 Hertz.
 13. The pressure transmitter of claim 1 wherein the pressure transmitter is adapted to couple to a pitot tube primary flow element.
 14. The pressure transmitter of claim 13 wherein the pitot tube is an averaging pitot tube.
 15. The pressure transmitter of claim 14 wherein the averaging pitot tube is insertable through a tap on a pipe.
 16. The pressure transmitter of claim 13 further comprising an instrument manifold coupled between the pressure generator and the pressure sensor.
 17. The pressure transmitter of claim 1 wherein the primary flow element and impulse lines are combined in an integral orifice.
 18. The pressure transmitter of claim 1 wherein the pressure transmitter is adapted to couple to a venturi primary flow element.
 19. The pressure transmitter of claim 1 wherein the pressure transmitter is adapted to couple to a nozzle primary flow element.
 20. The pressure transmitter of claim 1 wherein the pressure transmitter is adapted to couple to an orifice primary flow element adapted for clamping between pipe flanges.
 21. A pressure transmitter adapted to couple to a primary flow element via impulse lines to sense flow, the pressure transmitter comprising: a differential pressure sensor adapted to couple to the impulse lines to sense a pressure; a flow circuit coupled to the sensor to generate a flow output; a difference circuit coupled to the sensor to generate a difference output representing the sensed pressure minus a moving average; a calculate circuit to receive the difference output, calculate a trained output of historical data obtained during training, and calculate a monitor output of current data obtained during monitoring; and a diagnostic circuit to receive the trained output and the monitor output and generate a diagnostic output indicating a current condition of flow sensing relative to an historical condition of flow sensing.
 22. The pressure transmitter of claim 21 wherein the differential pressure sensor includes remote seals.
 23. The pressure transmitter of claim 21 wherein the flow output is a time integral of flow indicating a quantity of fluid in a tank.
 24. The pressure transmitter of claim 23 further including a wet leg.
 25. The pressure transmitter of claim 23 further including a dry leg.
 26. The pressure transmitter of claim 21 wherein the calculate circuit stores the historical data.
 27. The pressure transmitter of claim 21 wherein the moving average is calculated according to the series $A_{j} = {\sum\limits_{k = 0}^{m}\quad {\left( P_{j + k} \right)\left( W_{k} \right)}}$

where A is the moving average, P is a series of sensed pressure values, and W is a weight for a sensed pressure value, m is a number of previous sensed pressure values in the series, k is an integer ranging from 0 to m and j identifies a sample number.
 28. The pressure transmitter of claim 21 wherein the historical data comprises statistical data.
 29. The pressure transmitter of claim 21 wherein the calculate circuit switches between a training mode and a monitoring mode.
 30. The pressure transmitter of claim 29 wherein the calculate circuit stores historical data in the monitoring mode.
 31. The pressure transmitter of claim 21 wherein the diagnostic output comprises a real time indication of the condition of a pressure generator.
 32. The pressure transmitter of claim 21 wherein the diagnostic circuit indicates a condition of the primary element.
 33. The pressure transmitter of claim 21 wherein the diagnostic circuit indicates a condition of the impulse lines.
 34. The pressure transmitter of claim 21 wherein the flow output comprises a calibrated output and the diagnostic circuit indicates if the pressure sensor is out of calibration.
 35. The pressure transmitter of claim 21 wherein the historical data comprises power spectral density of the difference output.
 36. The pressure transmitter of claim 35 wherein the power spectral density data is in the range of 0 to 100 Hertz.
 37. The pressure transmitter of claim 21 wherein the diagnostic circuit implements a diagnostic algorithm selected from the group of algorithms consisting of neural networks, fuzzy logic, wavelets and Fourier transforms.
 38. A fluid flow meter adapted to sense fluid flow, comprising, a pressure generator having a primary element and impulse lines couplable to the fluid flow; a differential pressure sensor coupled to the impulse lines to sense a pressure; a flow circuit coupled to the sensor to generate a flow output; a difference circuit coupled to the sensor to generate a difference output representing the sensed pressure minus a moving average of the sensed pressure; a calculate circuit to receive the difference output and calculate a trained output of historical data obtained during training and calculating a monitor output of current data obtained during monitoring; and a diagnostic circuit to receive the trained output and the monitor output and generate a diagnostic output indicating a current condition of the pressure generator relative to an historical condition.
 39. The fluid flow meter of claim 38 wherein the calculate circuit stores the historical data.
 40. The fluid flow meter of claim 38 wherein the moving average is calculated according to the series $A_{j} = {\sum\limits_{k = 0}^{m}\quad {\left( P_{j + k} \right)\left( W_{k} \right)}}$

where A is the moving average, P is a series of sensed pressure values, and W is a weight for a sensed pressure value, m is a number of previous sensed pressure values in the series, k is an integer ranging from 0 to m and j identifies a sample number.
 41. The fluid flow meter of claim 38 wherein the historical data comprises statistical data.
 42. The fluid flow meter of claim 38 wherein the calculate circuit switches between a training mode and a monitoring mode.
 43. The fluid flow meter of claim 42 wherein the calculate circuit stores the historical data in the training mode.
 44. The fluid flow meter of claim 38 wherein the diagnostic output indicates a real time condition of the pressure generator.
 45. The fluid flow meter of claim 44 wherein the diagnostic output indicates a condition of the primary element.
 46. The fluid flow meter of claim 44 wherein the diagnostic output indicates a condition of the impulse lines.
 47. The fluid flow meter of claim 38 wherein the flow output comprises a calibrated output and the diagnostic output indicates if the pressure generator is out of calibration.
 48. The fluid flow meter of claim 38 wherein the historical data comprises power spectral density of the difference output.
 49. The fluid flow meter of claim 48 wherein the power spectral density data is in the range of 0 to 100 Hertz.
 50. The fluid flow meter of claim 38 wherein the primary element comprises a pitot tube.
 51. The fluid flow meter of claim 50 wherein the pitot tube is an averaging pitot tube.
 52. The fluid flow meter of claim 51 wherein the averaging pitot tube is inserted through a tap on a pipe.
 53. The fluid flow meter of claim 50 further comprising an instrument manifold coupled between the pressure generator and the pressure sensor.
 54. The fluid flow meter of claim 38 wherein the primary element and impulse lines are combined in an integral orifice.
 55. The fluid flow meter of claim 38 wherein the primary element comprises a venturi.
 56. The fluid flow meter of claim 38 wherein the primary element comprises a nozzle.
 57. The fluid flow meter of claim 38 wherein the primary element comprises an orifice plate adapted for clamping between pipe flanges.
 58. The flow meter of claim 38 wherein the diagnostic current implements a diagnostic algorithm selected from the group of algorithms consisting of neural networks, fuzzy logic, wavelets and Fourier transforms.
 59. A diagnostic method performed in a pressure transmitter coupled to a primary flow element via impulse lines, the method comprising: calculating a difference between a pressure sensed by the pressure transmitter and a moving average of the sensed pressure; acquiring and storing an historical data set of the calculated difference during a train mode of the pressure transmitter; acquiring and storing a current data set of the calculated difference during a monitoring mode of the pressure transmitter; comparing the current data set to the historical data set to diagnose the condition of the primary flow element and impulse lines; and generating output of the pressure transmitter indicating the condition of the primary flow element and impulse lines.
 60. The method of diagnosis of claim 59 wherein the historical data set comprises statistical data on the calculated difference.
 61. The method of diagnosis of claim 60 wherein the current data set comprises current data on a sample average (X) and a sample standard deviation (s) of the calculated difference.
 62. The method of diagnosis of claim 61 wherein the sample average (X) is compared to a mean (μ) to diagnose erosion of the primary flow element.
 63. The method of diagnosis of claim 62 wherein the sample deviation (s) is compared to the standard deviation (σ) to diagnose impulse line plugging.
 64. The method of diagnosis of claim 59 wherein the historical data set comprises data on the power spectral density of the calculated difference.
 65. The method of diagnosis of claim 64 wherein the current data set comprises data on the power spectral density of the calculated difference.
 66. The method of diagnosis of claim 59 wherein the comparing includes performing a diagnostic algorithm selected from the group of algorithms consisting of neural networks, fuzzy logic, wavelets and Fourier transforms.
 67. A computer-readable medium having stored thereon instructions executable by a microprocessor system in a pressure transmitter to cause the pressure transmitter to perform a diagnostic operation relative to a primary element and impulse lines couplable to the transmitter, the instructions comprising: calculating a difference between a pressure sensed by the pressure transmitter and a moving average of the sensed pressure; acquiring and storing an historical data set of the calculated difference during a train mode of the pressure transmitter; acquiring and storing a current data set of the calculated difference during a monitoring mode of the pressure transmitter; comparing the current data set to the historical data set to diagnose the condition of the primary element and impulse lines; and generating an output of the pressure transmitter indicating the condition of the primary element and impulse lines.
 68. A pressure transmitter adapted to couple to a primary flow element via impulse lines to sense flow, the pressure transmitter comprising: a differential pressure sensor adapted to couple to the impulse lines to sense a pressure; a flow circuit coupled to the sensor and generating a flow output; differencing means coupled to the sensor for generating a difference output representing the sensed pressure minus a moving average of the sensed pressure; calculating means receiving the difference output for calculating a trained output of historical data obtained during training and for calculating a monitor output of current data obtained during monitoring; and diagnosing means receiving the trained output and the monitor output and generating a diagnostic output for diagnosing a current condition of flow sensing relative to an historical condition of flow sensing. 